﻿using System;
using UnityEngine;

namespace XUBugly
{
    public class XUBuglyData
    {
        [Serializable]
        public class AndroidData
        {
            public string appID { get { return androidId; } }
            [SerializeField] private string androidId = "";

            public string appKey { get { return androidKey; } }
            [SerializeField] private string androidKey = "";
        }

        [Serializable]
        public class iOSData
        {
            public string appID { get { return iOSId; } }
            [SerializeField] private string iOSId = "";

            public string appKey { get { return iOSKey; } }
            [SerializeField] private string iOSKey = "";
        }

        public AndroidData android { get; private set; } = null;

        public iOSData iOS { get; private set; } = null;

        public XUBuglyData(string json)
        {
            android = JsonUtility.FromJson<AndroidData>(json);
            iOS = JsonUtility.FromJson<iOSData>(json);
        }
    }
}